<template>
  <div>
    <!--分割线-->
    <el-divider></el-divider>
    <router-link to="/index/userInfo">
      <!--      头像-->
      <el-avatar :src="'/static/head-photo/'+sender.headPhoto" :size="50"
                 style="float: left"></el-avatar>
      <!--      发送者昵称-->
      <div style="float: left"><b>
        {{ sender.username }}
      </b></div>
    </router-link>
    <div v-if="receiver!=null" style="float: left">&nbsp;&nbsp;&nbsp;回复&nbsp;&nbsp;&nbsp;
      <router-link to="/">
        <b>
          {{ receiver.username }}
        </b>
      </router-link>
    </div>
    <br>
    <div style="float: right">
        <slot name="reply"></slot>
    </div>
    <!--    发送时间-->
    <span style="line-height: 36px;color: #908d8d">{{ date }}</span>
  </div>
</template>

<script>

export default {
  name: 'UserHead',
  props: ['sender', 'receiver', 'date']
}
</script>

<style scoped>
</style>
